package com.jintian.smart.base.api.system.entity;

import com.jintian.smart.base.api.system.constant.DataScopeTypeEnum;
import com.jintian.smart.base.api.system.constant.DataScopeViewTypeEnum;
import com.jintian.smart.kernel.core.domain.IEntity;
import lombok.Data;
import org.beetl.sql.annotation.builder.FillStrategy;
import org.beetl.sql.annotation.builder.UpdateTime;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.Table;

import java.time.LocalDateTime;

/**
 * 数据范围与角色关系
 */
@Data
@Table(name = "sys_role_data_scope")
public class RoleDataScopeEntity implements IEntity {
    /**
     * 主键id
     */
    @AssignID("snowid")
    private Long id;
    /**
     * 数据范围id
     * {@link DataScopeTypeEnum}
     */
    private Integer dataScopeType;
    /**
     * 数据范围类型
     * {@link DataScopeViewTypeEnum}
     */
    private Integer viewType;
    /**
     * 角色id
     */
    private Long roleId;

    /**
     * 更新时间
     */
    @UpdateTime(FillStrategy.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @UpdateTime(FillStrategy.INSERT)
    private LocalDateTime createTime;
}
